
public class test3142 {
    public static void main(String [] args){
//找出是否有相同数字
        int arr[]={23,42,64,74,24};
        boolean a=contains(arr,23);
        System.out.println(a);
    }
    public static boolean contains(int arr[],int number){
        for(int i=0;i< arr.length;i++){
            if(arr[i]==number){
                return true;
            }

        }
        return false;
    }
}

